home *** CD-ROM | disk | FTP | other *** search
- Path: news-1.csn.net!ncar!usenet
- From: James Adams <jadams@ucar.edu>
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Code Organization - seeking reference
- Date: 4 Apr 1996 17:51:27 GMT
- Organization: National Center for Atmospheric Research/Boulder, CO
- Message-ID: <4k126v$bvq@ncar.ucar.edu>
- NNTP-Posting-Host: mayfly.cgd.ucar.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (X11; I; IRIX 5.3 IP22)
- X-URL: news:comp.lang.c
-
- Hello,
-
- I have never had a firm grasp of the accepted code organization
- practices for C (and now C++). What I'm referring to are issues such as
- where I should include include files, declarations, and function definitions
- in my source files. For example it seems redundant to include stdio.h in
- every source file, why not just once in the main header file ? I have used
- more than one method of code organization and they have each worked, but I
- would like to finally begin using the conventional code orginization practice,
- if there is one.
-
- Please let me know (via email preferably) if you know of a reference
- which addresses this topic. This was never spelled out to me when I was
- first learning C, and now that I am learning C++ it is again confusing me
- (for example header files seem to be the accepted place for class and
- inline function definitions in C++, whereas I was under the assumption that
- header files were primarily for declarations of user defined types). I have
- yet to find any introductory C or C++ book which spells out the correct way
- to organize the code, perhaps there are some which have this information
- included along with the various other topics. I'm hoping there is a reference
- out there which deals with this in one section.
-
- Thanks in advance for any pointers or insight !
-
-
- -James
- --
- ---------------------------------------------------------------------------
- James Adams Email: jadams@ucar.edu
- National Center for Atmospheric Research Phone: (303) 497-1356
- Boulder, Colorado Fax: (303) 497-1348
-
- WWW: http://www.cgd.ucar.edu/ccr/jadams/home.html
-
-